← Back
Focus Ring
[basic]Accessibility focus ring indicators
Accessibility focus ring indicators
For the full interactive experience:
$ mix raxol.playground
Code
items =
@items
|> Enum.with_index()
|> Enum.map(fn {label, idx} ->
if idx == model.focused do
rendered = FocusRing.render(label, model.ring_config)
text(rendered, fg: :cyan)
else
text(" #{label} ", style: [:dim])
end
end)